<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/templates/fornecedor.xhtml">

	<ui:define name="menu">
		<ui:include src="/fornecedor/menu.xhtml" />
		<ui:define name="body"></ui:define>
	</ui:define>
	<ui:define name="conteudo">

		<h:form id="form">
			<h:inputHidden value="#{clienteBean.cliente.idCliente}" />
			<div id="texto">
				<h2>Manutenção de cliente</h2>
			</div>


			<br></br>

			<h:panelGroup>
				<h:commandButton value="Pesquisar"
					action="#{clienteBean.buscarGeralCliente()}" style="height: 30px;" />
				<!--                 <h:commandLink action="#{clienteBean.buscarGeralCliente()}" value="cliente" />	 -->
				<!--                 <h:graphicImage library="imagens" name="pesquisar.png" /> -->

				<div style="margin-top: 10px;">




					<p:dataTable id="clientes" var="clientes"
						value="#{clienteBean.buscarGeral}">
						<p:column style="width:20px">
							<h:outputText id="dragIcon" styleClass="ui-icon ui-icon-arrow-4" />

							<p:draggable for="dragIcon" revert="true" />
						</p:column>

						<p:column headerText="Nome">
							<!-- 	            <h:form id="cliente">    -->
							<h:commandLink action="/cliente/cadastro.xhtml"
								value="#{clientes.nome}">
								<f:setPropertyActionListener target="#{clienteBean.cliente}"
									value="#{nome}" />
							</h:commandLink>
							<!-- 				</h:form>   -->
						</p:column>

						<p:column headerText="CNPJ">
							<h:outputText value="#{clientes.cpfCnpj}" />
						</p:column>


						<p:column headerText="E-mail">
							<h:outputText value="#{clientes.email}" />
						</p:column>

						<p:column headerText="Endereço">
							<h:outputText value="#{clientes.endereco}" />
						</p:column>

						<p:column headerText="Ações">
							<h:outputText value="#{acaoes}" />
							<f:facet name="header">Ações</f:facet>
							<h:commandLink action="#{clienteBean.excluir}"
								onclick="if (!confirm('Deseja realmente excluir o cliente#{cliente.nome}?'))return false;">
								<h:graphicImage library="imagens" name="excluir2.png" />
								<f:setPropertyActionListener
									target="#{clienteBean.clienteSelecionado}" value="#{clientes}" />
							</h:commandLink>

							<h:commandLink>
								<h:graphicImage library="imagens" name="editar.png" />
								<f:setPropertyActionListener
									target="#{clienteBean.clienteSelecionado}" value="#{clientes}" />
								<h:commandLink value="" action="/cliente/cadastro.xhtml" />
							</h:commandLink>
						</p:column>

						<a id="a_tag" href="javascript: void(0)">click here</a>
						<script type="text/javascript">  
		$('#a_tag').click(function(){})  
		</script>

						<script type="textjavascript">
			            	
</script>
					</p:dataTable>


				</div>
			</h:panelGroup>

		</h:form>
	</ui:define>

</ui:composition>
</html>